package com.dongdong.controller;


import com.dongdong.service.ContentService;
import com.dongdong.utils.Result;
import com.dongdong.vo.ContentCategoryVO;
import com.dongdong.vo.ContentVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/contents")
public class ContentsController {

    @Autowired
    private ContentService contentService;


    @GetMapping("/getContentCategory")
    public Result getContent(@RequestParam Long id){
        ContentCategoryVO categoryVO = contentService.getContent(id);
        return Result.OK().setData(categoryVO);
    }

}
